# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-pyqt-feedback-flow
_pkgorig=pyqt-feedback-flow
pkgver=0.3.3
pkgrel=0
pkgdesc="Show feedback in toast-like notifications"
url="https://github.com/firefly-cpp/pyqt-feedback-flow"
arch="noarch"
license="MIT"
depends="python3 py3-emoji py3-qt6"
makedepends="py3-gpep517 py3-poetry-core"
checkdepends="py3-pytest-xdist"
subpackages="$pkgname-doc $pkgname-pyc"
source="https://github.com/firefly-cpp/pyqt-feedback-flow/archive/$pkgver/$_pkgorig-$pkgver.tar.gz"
builddir="$srcdir/$_pkgorig-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -n auto
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/pyqt_feedback_flow-$pkgver-py3-none-any.whl

	install -Dm644 README.md -t "$pkgdir"/usr/share/doc/$pkgname
	install -Dm644 CITATION.cff -t "$pkgdir"/usr/share/doc/$pkgname
}

sha512sums="
1d6dd50340768526f20c15938e87396ea5789f77c726fd1731fe472f72674a245360a72a6e0532a7e7f223eb6238d6e0696a73f9711d1e36d48ec8d8e111bfc7  pyqt-feedback-flow-0.3.3.tar.gz
"
